/*
 * 清除浮动
 */
.mix-clearfix () {
  &:before,
  &:after {
    content: '';
    display: table;
    clear: both;
  }
}

/* 垂直居中 */

.mix-flex-y-center () {
  display: flex;
  align-items: center;
}

/* 水平居中 */

.mix-flex-x-center () {
  display: flex;
  justify-content: center;
}

/* 水平垂直居中 */

.mix-flex-center () {
  display: flex;
  align-items: center;
  justify-content: center;
}

/* 超出部分出省略号 */

.mix-text-overflow () {
  white-space: nowrap;
  text-overflow: ellipsis;
  overflow: hidden;
}

/* 多行文本超出部分省略号 */

.ellipsis-line(@line: 2) {
  display: -webkit-box;
  text-overflow: ellipsis;
  overflow: hidden;
  text-overflow: ellipsis;
  display: -webkit-box;
  -webkit-line-clamp: @line;
  box-orient: vertical;
  -webkit-box-orient: vertical;
}

/* flex 布局 */

.flex() {
  display: flex;
  justify-content: space-between;
  flex-direction: row;
}